What is when he says sweet dreams?

When someone says "sweet dreams", they are typically expressing a desire for the person they are speaking to to have pleasant and restful sleep. The phrase is often used as a way to bid someone farewell before they go to bed or fall asleep. It can be a way of showing concern for the other person's well-being and wishing them a peaceful night's rest. The phrase "sweet dreams" can also be used as a gesture of kindness or comfort in difficult or stressful situations.